
<html>
<head>
<title>Prototype examples</title>
<script type="text/javascript" src="javascript/prototype.js"></script>
<script type="text/javascript" >
function uploadFile()
{
	alert("call func");
	new Ajax.Request('cgi-bin/upload.cgi', {
		  method: 'get',
		  onSuccess: successFunc,
		  onFailure:  failureFunc
		  });
}
function successFunc(response){		   
    if (200 == response.status){
        alert("Call is success");
    }
    var container = $('notice');
    var content = response.responseText;
    container.update(content);
}

function failureFunc(response){
     alert("Call is failed" );
    
}
</script>
</head>
<body>
	<p>
		Photo to Upload: <input type="file" name="photo" multiple
			accept="image/*" />
	</p>
	<p>
		<input type="submit" name="Submit" value="Submit Form"
			onclick="uploadFile();" />
	</p>
</body>
</html>
